#ifndef CUNIT_H

#define CUNIT_H

#include "Typedef.h"

class CUnit
{
public :
	CUnit(void);
	virtual ~CUnit(void);
	virtual int GetX(void) = 0;
	bool Act(void);
	bool Hit(int _nDamege);
protected :
	virtual void Move(void) = 0;
	virtual void SearchEnumy(void) = 0;
	virtual void Attack(void) = 0;
	int m_nDelayMove;
	int m_nDelayAttack;
	int m_nAttackCount;
	int m_nMoveSpeed;
	int m_nFinalTime_Attack;
	int m_nFinalTime_Move;
	int m_nState;
	int m_nX;
	int m_nY;
	int m_nHP;
	int m_nDamege;
	int m_nSearchRange;
	int m_nNowTime;
	CUnit* m_pTarget;
	ls_Unit *pEnumys;
	ls_Unit::iterator itr;
};

class CWarrior : public CUnit
{
public :
	CWarrior(void);
	CWarrior(ls_Unit* _pEnumys);
	~CWarrior(void);
	int GetX(void);

private :
	void Move(void);
	void SearchEnumy(void);
	void Attack(void);
};

class CZombie : public CUnit
{
public :
	CZombie(void);
	CZombie(ls_Unit *_Enumys);
	~CZombie(void);
	int GetX(void);

private :
	void Move(void);
	void SearchEnumy(void);
	void Attack(void);
};

#endif